package com.crl.game.simulation.common.manager
{
	import com.crl.game.simulation.common.SimulationObject;
	
	import flash.utils.Dictionary;

	/**
	 * 仿真对像管理器; 
	 * @author crl
	 * 
	 */	
	public class SobManager
	{
		/**
		 * 仿真对像列表; 
		 */		
		private var sobs:Dictionary;
		public function SobManager()
		{
			sobs=new Dictionary();
		}
		
		/**
		 * 存入; 
		 * @param key
		 * @param value
		 * 
		 */		
		public function set(key:int,value:SimulationObject):void{
			sobs[key]=value;
			if(value==null){
				delete sobs[key];
			}
		}
		
		/**
		 * 取得; 
		 * @param key
		 * @return 
		 * 
		 */		
		public function get(key:int):SimulationObject{
			return sobs[key];
		}
		
		
		/**
		 * 保存; 
		 * @param key
		 * 
		 */		
		public function save(key:int):void{
			//todo;
		}
		
		/**
		 * 载入 
		 * @param key
		 * 
		 */		
		public function restore(key:int):void{
			//todo;
		}
	}
}